clear; clc; getSession;
%%
zs = sess.getZIServer;
swpr = zs.sweeperModule('swpr');
%%
swpr.initialize();
swpr.setSweepParameter('dev3543', ziSweepNode.SigOut_Offset, 0.0, 1.0, 'npoint', 20);
swpr.setFilter('bandwidthcontrol', ziEnumSweepBWMode.Mannual);
swpr.setSettling('settling_time', 0.001);
swpr.setStatistics('averaging_sample', 20);
swpr.setOption('sincfilter', 0, 'phaseunwrap', 0);

swpr.subscribe('dev3543', ziDemod1.R,   [2 1 1]);
swpr.subscribe('dev3560', ziPID3.Error, [2 1 2]);
res = swpr.run();
res.plot_data('dev3560', ziPID3.Error)